<div class="peopleSigns form">
<?php echo $this->Form->create('PeopleSign');?>
<?php echo $this->Form->input('person_id',array( 'type' => 'hidden', 'value' => $id_paciente));?>
	<fieldset>
 		<legend><?php __('Asociar Signos Vitales'); ?></legend>


	<table cellpadding="0" cellspacing="0">
	<tr>
			<th><?php __('Signo Vital'); ?></th>
			<th><?php __('Valor'); ?></th>
			<th><?php __('Fecha'); ?></th>
	</tr>
<?php
	$i = 0;


	foreach($signs as $indice_aux => $arreglo_signo){

			$class = null;
			if ($i++ % 2 == 0) {
				$class = ' class="altrow"';
			}

			// Averiguo la Unidad
			if(!empty($arreglo_signo['Sign']['unidad'])){
				$unidad = "&nbsp;(".$arreglo_signo['Sign']['unidad'].")";
			}else{
				$unidad = "";
			}
?>
			<tr<?php echo $class;?>>
				<td><?php echo "<b>".$arreglo_signo['Sign']['name']."</b>$unidad"; 	
						echo $this->Form->input('sign_id.'.$i,array( 'type' => 'hidden', 'value' => $arreglo_signo['Sign']['id'])); ?></td>
				<td><?php echo $this->Form->input('valor.'.$i,array( 'label' => '') )?></td>
				<td><?php echo $this->Form->input('fecha.'.$i,array( 'label' => ''
								, 'dateFormat' => 'DMY'
								, 'minYear' => date('Y') - 80
								, 'maxYear' => date('Y') )); ?></td>
			</tr>
<?php
	} 
?>

	</table>
	</fieldset>
	<table cellpadding="0" cellspacing="0">
	<tr>
		<td><?php echo $this->Form->end(__('Asociar', true));?></td>
		<td><br><br><?php echo $this->Html->link("Cancelar","/people/view/".$id_paciente."/4",array('escape' => false, 'class' => 'link_cancelar') );?></td>
	</tr>
	</table>
</div>